<input type="hidden" value="<?php echo base_url()?>" id="base_url" />
<input type="hidden" value="<?php echo $this->session->userdata('user_id'); ?>" id="user_id" />

<div class="col2-left-layout">
    <div class="main">
        <div class="col-main"> 
          <!--Category Title-->
          <div class="page-title category-title">
            <h1>Womens</h1>
          </div>
          <!--Category Image-->         
          <div class="category-products"> 
            <!--Start toolbar-->
            <div class="toolbar">                           
                <?php// echo $list_link; ?>                
            </div>
            <!--End toolbar--> 
            
            <!--Start Category Product List-->
            <ol id="products-list" class="products-list">
                <?php foreach($list_child_restaurent as $res){ 
                    // check restaurent in wishlist
                    $user_id = $this->session->userdata('user_id');
                    $restaurent = new Restaurent();                       
                    $restaurent->where('id',$res->id);    
                    $restaurent->include_related('term_taxonomy',array('term_id','taxonomy'))
                            ->where_related('term_taxonomy', 'taxonomy', 'wishlistrestaurent')
                            ->where_related('term_taxonomy', 'user_id', $user_id);                  
                    $count_restaurent = $restaurent->count();  
                    
                    if ($count_restaurent>0) $check_like = true; else $check_like = false;  
                    
                ?>
                <li class="item odd">
                    <a class="restaurent_image" title="" href="<?php echo base_url().'restaurents/restaurents/detail/'.$res->id ?>">
                        <img width="135" height="135" alt="" src="<?php echo $res->image; ?>">
                    </a>
                    <div class="product-shop">
                        <div class="f-fix">
                            <h2 class="restaurent_name">
                                <a title="" href="<?php echo base_url().'restaurents/restaurents/detail/'.$res->id ?>"><?php echo $this->common->get_lang($res->name); ?></a>
                            </h2>
                            <div class="restaurent_address">
                                <?php echo $this->common->get_lang($res->address); ?>
                            </div>                       
                            <div class="restaurent_time">
                                Giờ mở cửa: 8h00-20h00
                            </div>
                            <div class="restaurent_description">
                                <?php echo $res->description; ?>
                            </div>
                            <?php include('wishlist_button_restaurent.php');  ?>
                           
                        </div>
                    </div>
                </li>
                <?php } ?>
            </ol>
                       
            <!--End Category Product List--> 
            
            <!--Start toolbar bottom-->
            <div class="toolbar-bottom">
              <div class="toolbar">                
                <?php// echo $list_link; ?>
              </div>
            </div>
            <!--End toolbar bottom--> 
          </div>
        </div>
        <div class="col-left sidebar">
            <div class="block block-account">
                <div class="block-title">
                    <strong><span>Tài khoản</span></strong>
                </div>
                <div class="block-content">
                    <ul>
                        <li><a href="<?php echo base_url(); ?>users/account">Thông tin tài khoản</a></li>                                               
                        <li><a href="<?php echo base_url(); ?>users/changepass">Đổi mật khẩu</a></li>                        
                        <li  class="current"><a href="<?php echo base_url(); ?>users/wishlists/restaurent"><strong>Nhà hàng yêu thích</strong></a></li>  
                        <li><a href="<?php echo base_url(); ?>users/wishlists/product"><strong>Món ăn yêu thích</strong></a></li>  
                    </ul>
                </div>
            </div>                   
            <div class="block block-cart">
                <div class="block-title">
                    <strong><span>Giỏ hàng</span></strong>
                </div>
                <div class="block-content">
                    <p class="empty">Bạn không có sản phẩm nào trong giỏ hàng!</p>
                </div>
            </div>           
        </div>
    </div>
</div